package com.deercrowing.takeaway.entity;

import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;

/**
 * 用户表(Users)表实体类
 *
 * @author guoyongxiang
 * @since 2024-07-25 10:39:09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_users")
public class UsersEntity extends Model<UsersEntity> {
    //ID，唯一标识    
    @TableId
    private Long id;
    //微信用户唯一标识    
    @TableField("openid")
    private String openid;
    //昵称    
    @TableField("name")
    private String name;
    //手机号    
    @TableField("phone")
    private String phone;
    //性别，0女、1男    
    @TableField("sex")
    private Short sex;
    //身份证号    
    @TableField("id_number")
    private String idNumber;
    //头像    
    @TableField("avatar")
    private String avatar;
    //创建时间    
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
    
}

